<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <title>访谈管理</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="../../css/bootstrap.min.css">
    <link rel="stylesheet" href="../../css/font-awesome.min.css">
    <link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
    <link rel="stylesheet" href="../../plugins/ztree/css/metroStyle/metroStyle.css">
    <link rel="stylesheet" href="../../css/main.css">
    <script src="../../libs/jquery.min.js"></script>
    <script src="../../plugins/layer/layer.js"></script>
    <script src="../../libs/bootstrap.min.js"></script>
    <script src="../../libs/vue.min.js"></script>
    <script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
    <script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
    <script src="../../plugins/ztree/jquery.ztree.all.min.js"></script>
    <script src="../../js/common.js"></script>
</head>
<style>
    .tags-line{
        display: inline-block;
    }
    .addBookfrom{
        width:100%;
    }
    .form-group{
        /*width:auto;*/
        height: 50px;
        padding: 0px;
    }
    .form-group>div{
        height:100%;
    }
    .col-sm-6,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-9{
        padding-right:0;
    }

</style>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showDom == 'list'">
        <div class="grid-btn" class="form-group col-sm-2">
            <div class="form-group col-sm-2">
                <input type="text" class="form-control" v-model="q.headline" @keyup.enter="query" placeholder="标题">
            </div>
            <a class="btn btn-default" @click="query">查询</a>
            <div class="btn-group" role="group" aria-label="...">
                <a v-if="hasPermission('sys:interview:save')" class="btn btn-primary btn-sm" @click="add"><i class="fa fa-plus"></i>&nbsp;添加访谈</a>
                <a v-if="hasPermission('sys:interview:update')" class="btn btn-primary btn-sm" @click="update"><i class="fa fa-plus"></i>&nbsp;修改访谈</a>
                <a v-if="hasPermission('sys:interview:interviewInfo')" class="btn btn-primary btn-sm" @click="getInterviewInfoList"><i class="fa fa-pencil-square-o"></i>&nbsp;访谈详情列表</a>
                <!-- <a v-if="hasPermission('sys:book:savesection')" class="btn btn-primary btn-sm" @click="addsection"><i class="fa fa-pencil-square-o"></i>&nbsp;添加章节</a> -->
                <!-- <a v-if="hasPermission('sys:book:update')" class="btn btn-primary btn-sm" @click="updatesection"><i class="fa fa-pencil-square-o"></i>&nbsp;修改章节</a> -->
                <a v-if="hasPermission('sys:interview:delete')" class="btn btn-primary btn-sm" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            </div>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-if="showDom == 'interviewInfoList'">aaaa
        <table id="jqGrid2">aaaa</table>
        <div id="jqGridPager2">aaaa</div>
    </div>

    <div v-show="showDom == 'addOrEdit'" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">标题</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="interview.headline" placeholder="标题"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">内容</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="interview.content" placeholder="内容"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">封面</div>
                <div class="col-sm-10">
                    <input type="file" accept="image/gif,image/jpeg,image/jpg,image/png" ref="file" id="file" name="file" @change="changeImage($event)" class="form-control" placeholder="封面"/>
                    <img :src="interview.picture" style="max-width: 400px;position:fixed;top:calc(25%);right:100px;">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="../../js/modules/sys/interview.js"></script>
</body>
</html>